/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>
#include "sle_error_code.h"
#include "mock_ipcobject_stub.h"
#include "sle_connect_callback_proxy.h"
#include "sle_connect_proxy.h"
#include "sle_connect_callback_stub.h"
#include "g_val.h"

class SleConnectCallbackProxyTest : public testing::Test {
public:
    static void SetUpTestCase();
    static void TearDownTestCase();
    void SetUp() override;
    void TearDown() override;

};
void SleConnectCallbackProxyTest::SetUp()
{
}

void SleConnectCallbackProxyTest::TearDown()
{
}

void SleConnectCallbackProxyTest::SetUpTestCase()
{
}

void SleConnectCallbackProxyTest::TearDownTestCase()
{
}

namespace OHOS {
namespace NearLink {
namespace SleStandard {



/****************************************************ipc callback test **************************************************************************** */
HWTEST_F(SleConnectCallbackProxyTest, OnConnectStateChange_001, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectCallbackProxy> proxy = std::make_shared<SleConnectCallbackProxy>(mockStub);

    uint16_t connectId = 1;
    SleAddress address;
    int32_t state = 1;
    int32_t pairState = 1;
    uint16_t reason = 1;
    proxy->OnConnectStateChange(connectId,address,state,pairState,reason);

}
/******************************************************************************************************************************** */

HWTEST_F(SleConnectCallbackProxyTest, OnConnectParamUpdateComplete_001, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectCallbackProxy> proxy = std::make_shared<SleConnectCallbackProxy>(mockStub);

    uint16_t connectId = 0;
    uint16_t interval = 0;
    uint16_t latency = 0;
    uint16_t timeout= 0;
    uint32_t errCode = 0;
    proxy->OnConnectParamUpdateComplete( connectId,  interval,  latency,  timeout,  errCode);

}
/******************************************************************************************************************************** */

HWTEST_F(SleConnectCallbackProxyTest, OnAuthComplete_001, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectCallbackProxy> proxy = std::make_shared<SleConnectCallbackProxy>(mockStub);

    uint16_t connectId= 0;
    SleAddress address;
    SleAuthenticationInfo info;
    uint32_t errCode = 0;
    proxy->OnAuthComplete(  connectId,  address,  info,  errCode);

}
/******************************************************************************************************************************** */

HWTEST_F(SleConnectCallbackProxyTest, OnPairComplete_001, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectCallbackProxy> proxy = std::make_shared<SleConnectCallbackProxy>(mockStub);

    uint16_t connectId= 0;
    SleAddress address;
    uint32_t errCode = 0;
    proxy->OnPairComplete(   connectId, address,  errCode);

}
/******************************************************************************************************************************** */

HWTEST_F(SleConnectCallbackProxyTest, OnReadRssiComplete_001, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectCallbackProxy> proxy = std::make_shared<SleConnectCallbackProxy>(mockStub);

    uint16_t connectId= 0;
    int8_t rssi = 0;
    uint32_t errCode = 0;
    proxy->OnReadRssiComplete(  connectId,  rssi,  errCode);

}
/******************************************************************************************************************************** */






/****************************************************frameworks  test **************************************************************************** */





}}}